{% extends "layout.html" %}

{% block title %}Détail de l'offre{% endblock %}

{% block content %}



<form method="post" class="form-horizontal">

	<div class="row">
	
	 <!-- Première colonne -->
	<div class="span11">
      
	  <fieldset>
		<legend>Informations sur l'offre</legend>
		<input name="id" type="hidden" value="{{offre.id}}" class="uneditable-input"/>
	  {% if not(session.niveauAuth=='6')and not(session.niveauAuth=='7')and not(session.niveauAuth=='9') %}
      <div class="control-group">
		<label class="control-label" for="code_achat">Offre Achat</label>
        <div class="controls">
		<div class="input-prepend">
           <select name="code_achat" size="1" />
           {% for offre_achat in offres_achat %}
				  <option value="{{ offre_achat.id }}" {% if offre.id_option_ha == offre_achat.id %}selected{% endif %}>{{ offre_achat.nom }}</option>
            {% endfor %}
				</select>
		</div>
	  </div>
	  </div>
      {% else %}
      		<input name="code_achat" type="hidden" value="{{ offre.id_option_ha }}"/>
	  {% endif %}

      
	  <div class="control-group">
		<label class="control-label" for="code_article">Code Article</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="code_article" type="text" value="{{offre.code_article}}"/> 
		</div>
	  </div>
	  </div>
	  {% if not(session.niveauAuth=='6')and not(session.niveauAuth=='7') %}
	    <div class="control-group">
		<label class="control-label" for="famille">Choix de la famille option</label>
		<div class="controls">
		   <select name="famille" size="1">
		   <option value="">Selectionnez...</option>
			  <option value="sms" {% if offre.famille== "sms" %}selected{% endif %}>SMS</option>
			  <option value="data" {% if offre.famille== "data" %}selected{% endif %}>DATA</option>
			  <option value="bb" {% if offre.famille== "bb" %}selected{% endif %}>Blackberry</option>
			  <option value="international" {% if offre.famille== "international" %}selected{% endif %}>International</option>
			  <option value="interne" {% if offre.famille== "interne" %}selected{% endif %}>Appel interne</option>
               
               <option></option>
			</select>
		</div>
	  </div>
      {% else %}
      <input name="famille" type="hidden" value="{{offre.famille}}"/>
	  {% endif %}
      
      <div class="control-group">
		<label class="control-label" for="nom">Nom</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="nom" type="text" value="{{offre.nom}}"/> 
		</div>
	  </div>
	  </div>
      {% if not(session.niveauAuth=='6')and not(session.niveauAuth=='7') %}
      <div class="control-group">
		<label class="control-label" for="sms">SMS</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="sms" type="text" value="{{offre.sms}}"/> 
		</div>
	  </div>
	  </div>
      
      <div class="control-group">
		<label class="control-label" for="data">DATA</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="data" type="text" value="{{offre.data}}"/> 
		</div>
	  </div>
	  </div>
	   <div class="control-group">
		<label class="control-label" for="bb">Blackberry</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="bb" type="text" value="{{offre.bb}}"/> 
		</div>
	  </div>
	  </div>
	     <div class="control-group">
		<label class="control-label" for="international">International</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="international" type="text" value="{{offre.international}}"/> 
		</div>
	  </div>
	  </div>
 {% else %}
      <input name="sms" type="hidden" value="{{offre.sms}}"/>  
      <input name="data" type="hidden" value="{{offre.data}}"/>
      <input name="bb" type="hidden" value="{{offre.bb}}"/>
      <input name="international" type="hidden" value="{{offre.international}}"/>
 {% endif %}
      <div class="control-group">
		<label class="control-label" for="prix_seul">Prix Seul</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="prix_seul" type="text" value="{{offre.prix_seul|number_format(2, '.', ' ')}}"/> 
		</div>
	  </div>
	  </div>
        {% if not(session.niveauAuth=='6') and not(session.niveauAuth=='7') %}
      <div class="control-group">
		<label class="control-label" for="prix_avec_equipement">Prix avec équipement</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="prix_avec_equipement" type="text" value="{{offre.prix_avec_equipement|number_format(2, '.', ' ')}}"/> 
		</div>
	  </div>
	  </div>
{% else %}
      <input name="prix_avec_equipement" type="hidden" value="{{offre.prix_avec_equipement}}"/>       
{% endif %}
   
		<div class="form-actions">
                              
                      
                      
                      <button type="submit" class="btn btn-primary" name="action" value="update">Mise à jour de l'offre</button>
                     
					  
                      
    <div class="btn-group">
					  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
						Actions
						<span class="caret"></span>
					  </a>

						<ul class="dropdown-menu">
							
                            <li><a href="vente-option-mobile"><i class="icon-eye-open"></i> Afficher la liste des offres</a></li>
                         <li class="divider"></li>
							<li><a href="creation-vente-option-mobile"><i class="icon-shopping-cart"></i>Créer une nouvelle offre </a></li>
							
					  </ul>
					</div>
                    </div>
                    </div>
   


    
   </form> 
    
		
		
	


{% endblock %}
	
